#include <stdio.h>

int mystrlen(const char *s)
{
    int len = 0;
    while(s[len])
    {
        len++;
    }
    return len;
}

int mystrcpy(char *s1, const char *s2)
{
    int len = 0;//计数器
    while(s2[len])
    {
        s1[len] = s2[len];//把s2的地址赋给s1,这样就把s2的值赋给s1了
        len++;
    }
    return len;
}


int main()
{
    char a[10] = "abc";
    char b[10];
    mystrcpy(b, a);
    printf("%s\n", b);
    return 0;
}
